package org.wk.common.jpush;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * 推送配置
 */
@Configuration
public class PushConstant {

    public  static  String  JPUSH_APP_KEY = "c06968c781c2189b56856ec9";

    public  static  String  JPUSH_MASTER_SECRET = "e22cfebc79b99d8cdcc9906a";//JPUSH 密钥

    public  static  boolean  JPUSH_APNS_PRODUCTION = false;//是否生产推送

    public static final String ORGANIZATION_NAME="1111170222178028";//组织名称

    public static final String APPLICATION_NAME="jiuximarriage";//应用名称

    public static final String JPUSH_CLIENT_ID="YXA6uoSTcAfCEeezs1lmgt1Bew";

    public static final String JPUSH_CLIENT_SECRET="YXA6qEY9pcsl-ubpBzgjNH0GDZ2eZkY";

    public static final String JPUSH_GRANT_TYPE="client_credentials";

    public static final String tokenUrl = String.format("https://a1.easemob.com/%s/%s/token", PushConstant.ORGANIZATION_NAME, PushConstant.APPLICATION_NAME);

    public static final String regUrl = String.format("https://a1.easemob.com/%s/%s/user", PushConstant.ORGANIZATION_NAME, PushConstant.APPLICATION_NAME);

    /**
     * ios当前环境 false 开发环境，true 生产环境
     */

    public static boolean ios_env = false;

    private String iosEnv;

    @Value("${wk.jiguang.ios.env}")
    public void setIosEnv(String iosEnv) {
        this.iosEnv = iosEnv;
        if ("prod".equals(iosEnv)){
            ios_env = true;
        }else {
            ios_env = false;
        }
    }
}
